package com.cheers.common;

import java.io.Serializable;

public class ResultModel implements Serializable {

	private static final long serialVersionUID = 1L;

	// 操作编码
	protected String code;
	// 操作编码说明
	protected String desc;
	// 操作结果
	protected Object result;

	public ResultModel() {
	}

	/**
	 * 默认成功构造器
	 * 
	 * @param result
	 */
	public ResultModel(Object result) {
		this.code = Constants.OK;
		this.desc = Constants.OK_DESC;
		this.result = result;
	}

	/**
	 * 自定义构造器
	 * 
	 * @param code
	 * @param desc
	 * @param result
	 */
	public ResultModel(String code, String desc, Object result) {
		this.code = code;
		this.desc = desc;
		this.result = result;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public Object getResult() {
		return result;
	}

	public void setResult(Object result) {
		this.result = result;
	}

}
